package ControlLayer;

import java.sql.Date;
import java.util.ArrayList;

import DBLayer.DBEmployee;
import DBLayer.IFDBEmployee;
import ModelLayer.Employee;
import ModelLayer.Holiday;
import ModelLayer.RegularDayOff;

public class EmployeeCtr 
{	
	private IFDBEmployee empDB;
	
	public EmployeeCtr()
	{
		empDB = new DBEmployee();
	}
	
	public ArrayList<Employee> getAllEmployees()
	{
		return empDB.getAllEmployees();
	}
	
	public RegularDayOff getRegDayOff(int empId, Date date)
	{
		RegularDayOffCtr regDayCtr = new RegularDayOffCtr();
		
		return regDayCtr.getRegDayOff(empId, date);
	}
	
	public Holiday getHoliday(int empId, Date date)
	{
		HolidayCtr holidayCtr = new HolidayCtr();
		
		return holidayCtr.getHoliday(empId, date);
	}
	
	public Employee getEmpById(int id)
	{
		return empDB.getEmpById(id);
	}
}
